#!/usr/bin/python

import afcpyconnector


pippo = afcpyconnector.execute ( 'window', 'get_template', 'wow' )

print "* pippo: %s" % pippo


# using the internally defined CTypes! WOW!
print '-------------------'

window = afcpyconnector.new_plugin ( 'window' )

print window.get_template ( 'wow' )

window2 = afcpyconnector.new_plugin ( 'window' )

print window2.get_template ( 'trallallero' )
window2.today = "hello"
print 'window2.today: %s' % window2.today

print 'before: window.today = %d' % window.today

window.today = '682002'

print 'after: window.today = %s' % window.today


# here we load a new dynamic class
afcpyconnector.load_plugin ( 'tester', 'test_area/plugin.so' )

tester1 = afcpyconnector.new_plugin ( 'tester' )
tester1.print_hello ()

print type ( afcpyconnector.pyconnector )
